/**
 * @description  : 卷烟品牌单项展示组件
 * @descriptionDetail : 卷烟品牌单项展示组件
 * @copyright    : 浙江烟草
 * @author       : mc
 * @create       : 2022-12-05 15:33:37
 */
<template>
  <view class="contenor" @click="showImgs">
    <view class="right_p">
      <view class="content-title">
        <view class="content-title-label">
          {{ cigar.productName }}
        </view>
        <view>
          <span class="content-title-value">
            {{ cigar.productCode }}
          </span>
          <u-icon name="arrow-right" size="40" :color="$theme.u_light_color"></u-icon>
        </view>
      </view>
      <view class="company_view">
        <span>
          {{ cigar.supplyShortName || "--" }}
        </span>
        <span>
          {{ cigar.brandName || "--" }}
        </span>
      </view>
      <view class="price_view">
         <!-- 这里跟PC端保持一致，如果有批发指导价就取批发指导价，如果没有就取 本省批发价 2024-1-1 zyf start -->
        <span class="price_content">
          批发价：<span class="pr_sp_span">¥{{ cigar.tradePr?cigar.tradePr:cigar.provinceWholeSalePrice }}</span>
        </span>
         <!-- 这里跟PC端保持一致，如果有指导零售价去取指导零售价，如果没有就取 本省批发价 2024-1-1 zyf end -->
        <!-- 这里跟PC端保持一致，如果有指导零售价去取指导零售价，如果没有就取 本省零售价 2024-1-1 zyf start -->
        <span class="price_content">
          零售价：<span class="pr_sp_span">¥{{ cigar.rtlPr?cigar.rtlPr:cigar.provinceRetailPrice }}</span>
        </span>
         <!-- 这里跟PC端保持一致，如果有指导零售价去取指导，如果没有就取 本省零售价 2024-1-1 zyf end -->
      </view>
      <view class="size_view">
        <span class="size_content">
          长
          <span class="si_sp_span">
            {{ cigar.length }}mm
          </span>
        </span>
        <span class="size_content">
          宽&nbsp;
          <span class="si_sp_span">
            {{ cigar.width }}mm
          </span>
        </span>
        <span class="size_content">
          高
          <span class="si_sp_span">
            {{ cigar.height }}mm
          </span>
        </span>
      </view>
      <view class="params_view">
        <view class="params_item_view">
          <view class="params_item_top_view">
            <span class="lowColorSpan">包条形码</span><span>{{ cigar.packCode }}</span>
          </view>
          <view class="params_item_top_view">
            <span class="lowColorSpan">主包装色</span><span>{{ cigar.packMainColor }}</span>
          </view>
          <view class="params_item_top_view">
            <span class="lowColorSpan">副包装色</span><span>{{ cigar.packSubColor }}</span>
          </view>
        </view>

        <view class="params_item_view">
          <view class="params_item_top_view">
            <span class="lowColorSpan">条条形码</span><span>{{ cigar.stripCode }}</span>
          </view>
          <view class="params_item_top_view">
            <span class="lowColorSpan">主包装色</span><span>{{ cigar.stripMainColor }}</span>
          </view>
          <view class="params_item_top_view">
            <span class="lowColorSpan">副包装色</span><span>{{ cigar.stripSubColor }}</span>
          </view>
        </view>

        <view class="params_item_view">
          <view class="params_item_top_view">
            <span class="lowColorSpan">件条形码</span><span>{{ cigar.partCode }}</span>
          </view>
          <view class="params_item_top_view">
            <span class="lowColorSpan">主包装色</span><span>{{ cigar.partMainColor }}</span>
          </view>
          <view class="params_item_top_view">
            <span class="lowColorSpan">副包装色</span><span>{{ cigar.partSubColor }}</span>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props:{
    cigar:{
      type:Object,
      default:() => {},
    },
  },
  data() {
    return {
    };
  },
  computed:{

  },
  mounted() {
  },
  methods: {
    showImgs(){
      this.setRouteParam(this.cigar);
      this.$u.route("/pages/query/cigaretteLogoQuery/components/cigarDetailComponent");
    },
  },
};
</script>

<style lang="scss" scoped>
.content-title{
  display: flex;
  justify-content: space-between;
  padding: 30rpx 24rpx 20rpx 0;
  line-height: normal;
}
.content-title-label{
  font-size: 17px;
  font-weight: bold;
}
.content-title-value{
  color: #ADADAD;
  font-size: 30rpx;
  vertical-align: top;
  padding-right: 8rpx;
}
.left_p{
  width: 45px;
  float: left;
  overflow: hidden;
  .left_img_content{
    margin: 14px 2px auto auto;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    .left_img{
      width: 24px;
      height: 24px;
      margin: 1px;
    }
  }
}
.right_p{
  width: calc(100% - 18px);
  float: right;
  overflow: hidden;
  .params_view{
    float: left;
    margin-top: 3px;
    width: 100%;
    font-size: 8px;
    .params_item_top_view,.params_item_bottom_view{
      height: 25px;
      line-height: 25px;
    }
    .params_item_bottom_left_view{
      display: inline-block;
      width: calc(50%);
    }
  }
  .size_view{
    float: left;
    height: 40px;
    line-height: 40px;
    width: 95.8%;
    background-color: #F9F6F6;
    padding-left: 10px;
    .size_content{
      display: inline-block;
      width: 33.33%;
      text-align: left;
      font-size: 26rpx;
      .si_sp_span{
        font-size: 26rpx;
        color: #6DB1FC;
        padding-left: 3px;
        font-weight: 600;
      }
    }
  }
  .price_view{
    float: left;
    height: 30px;
    width: 100%;
    margin-top: 5px;
    .price_content{
      font-size:26rpx;
      display: inline-block;
      width: calc(50% - 5px);
      .pr_sp_span{
        color: #FF9F10;
        font-weight: 600;
      }
    }
  }
  .company_view{
    float: left;
    // height: 30px;
    width: 100%;
    span{
      display: inline-block;
      height: 15px;
      line-height: 15px;
      background-color: #EFF3F9;
      padding: 5px;
      color: #84859B;
      border-radius: 3px;
      font-size: 22rpx;
      margin: 3px 0px;

    }
    span:nth-child(2){
        margin-left: 10px;
      }
  }
  .nameinfo{
    float: left;
    height: 40px;
    width: 100%;
    .name_span{
      font-size: 17px;
      float: left;
      padding: 10px 10px 10px 0;
    }
    .num_span{
      padding: 10px;
      height: 20px;
      line-height: 20px;
      float: right;
      .nun_view{
        color: #ADADAD;
        display: inline-block;
        margin-right: 5px;
        font-size: 15px;
      }
      .go_right_img{
        height: 15px;
        width: 15px;
        display: inline-block;
        vertical-align: middle;
      }
    }
  }
}
.lowColorSpan{
  display: inline-block;
  color: #ADADAD;
  font-size: 24rpx;
  padding-right: 10px;
  + span{
    font-weight: 500;
  }
}
.params_item_view{
  margin-top: 10px;
  font-size: 26rpx;
}
.params_item_view:nth-child(n+2)::before{
  content: '';
  display: block;
  width: calc(100% - 20px);
  height: 1px;
  border-top: 1px solid #F1EEEE;
  padding-bottom: 10px;
}
.item_content{
  border: 1px solid red;
}
.contenor{
  padding-bottom: 20px;
}
</style>
